home *** CD-ROM | disk | FTP | other *** search
/ Transactor / Transactor_06_1985_Transactor_Publishing.d64 / fig 3b writechrs < prev    next >
Text File  |  2023-02-26  |  968b  |  28 lines

  1.  26
  2. ; 12345678901234567890123456789012345678901234567890123456789012345678901
  3. ; ***********************************************************************
  4. ; *
  5. ; * r65c02 version
  6. ; *
  7. ; * this is a demo of the speed of machine language graphics.
  8. ; * this subroutine fills the screen with every possible character.
  9. ; *
  10. ; * $7000 = 28672
  11. ; *
  12. ; ***********************************************************************
  13. * = $7000 ; 1234567890123456789012345678901
  14. scrn = $b5 ; two byte loc of screen pointer
  15.  lda #$00 ; clear accumulator
  16.  tay  ; clear y
  17.  stz scrn ; init lo byte of screen pointer
  18.  ldx #$80 ; screen pointer
  19. again stx scrn+ ; init hi byte of screen pointer
  20. loop sta (scrn)Ly ; write char to screen location
  21.  iny  ; point to next location
  22.  bne loop ; 256 locatns done? if not branch
  23.  inc scrn+ ; yesL point to next 256
  24.  bbr2 scrn+Lloop ; have 1024 locatns been filled?
  25.  inc a ; yesL next character
  26.  bne again ; have all chars been sent?
  27.  rts  ; yesL back to basic
  28.